package com.min.license.entity;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.*;

@Data
@NoArgsConstructor
public class License implements Serializable {

    public License(String id, long days) {
        this.machineId = id;
        this.expire = days * 24 * 3600 * 1000;
    }

    /**
     * 许可开始时间
     **/
    private final Long start = System.currentTimeMillis();

    /**
     * 许可过期时间
     **/
    private Long expire;

    /**
     * 机器唯一码
     **/
    private String machineId;


}
